
Industrial agents based on LLMs and time series data
Large language models, o LLMs, allow the use of natural language as a common interface to access this information. The user can ask a question without knowing the exact name of the variables, the structure of the database or the location of a procedure within a manual. From this question, the system interprets the intention and selects the most appropriate source of knowledge to provide the most appropriate response for the user.
There are techniques like RAG (Retrieval-Augmented Generation) [1], that allow you to consult manuals and technical documentation using natural language. For it, the system locates the fragments most related to the question and uses them as context to develop the answer. However, when it is necessary to represent the meaning of concepts, unify terminology or establish relationships between elements of the process, it is more appropriate to resort to ontologies.
A semantic structure organizes information in such a way that the meaning of its elements and the relationships between them are explicit and understandable to both people and computer systems.. Ontologies allow this structure to be formalized, defining the concepts of a domain, their properties and the relationships that exist between them.
In a machining application, An ontology can relate a piece to the material used, the machine used, quality requirements, inspections carried out, the signals recorded and the possible problems detected. As shown in Figure 1, The machined part acts as a central element and connects with the most relevant information of its manufacturing cycle, allowing us to know together how it was manufactured, what resources were used, what data was recorded, how its quality was verified and what result was obtained. Thus, The ontology establishes a common vocabulary that facilitates the connection between the language used by operators and the information stored in different industrial systems..
However, An ontology allows us to describe the meaning of concepts and the relationships between them., but it does not by itself show what happened during a specific manufacturing process. To answer questions about maximum values, tendencies, comparisons between periods or signals recorded before an alarm, it is also necessary to consult the process data stored by the machine. The system thus evolves towards an industrial agent capable of interpreting the question, decide whether to query the ontology or the time series database, execute a controlled operation and present the result in natural language. Its purpose is to facilitate analysis and support decision making, without modifying parameters or acting directly on the machine.
Questions related to the meaning and organization of variables are resolved by ontology, for example:
- What is the permitted operating range of the machine servomotors?
- What variable represents the second spindle current??
On the contrary, questions about what happened during the process require consulting the recorded signals, for example:
- What was the maximum torque value during the last cycle?
- What temperatures were recorded between 16 of January and 12 february?
This article presents an industrial agent architecture aimed at querying semantic knowledge and process data.. The system combines a locally executed language model, an ontology that relates industrial concepts to machine variables and a TimescaleDB time series database. As a use case, its application in a broaching machine is proposed, where the user can ask questions both about the meaning of the signals and about the values recorded during the process.
TimescaleDB as a process data repository
In industrial monitoring, process variables are usually recorded as time series, namely, sequences of values ordered according to the moment in which they were acquired. This structure allows us to reconstruct the evolution of the process and analyze the behavior of the signals at specific intervals., facilitating the identification of trends, changes or anomalies [2].
TimescaleDB [3] is an open source database based on PostgreSQL and prepared to store and analyze large volumes of temporary data. In the developed prototype, information is organized, as shown in Table 1, in a structure where each row represents an acquisition instant and each column corresponds to a machine variable.
These signals can come from the CNC, from the PLC, from external sensors or acquisition devices installed on the machine. The agent does not replace these systems, but rather provides an easier way to access stored information. Before making an inquiry, check which variables actually exist in the database, avoiding using incorrect or non-existent names. Thus, the user does not need to know the structure of the tables or write SQL queries, Instead, you can ask your questions using normal production or maintenance vocabulary..
Operation of the industrial agent
Once the two sources of information have been defined, both the ontology and the time series database, The next step is to coordinate your consultation. For it, the agent follows the flow shown in Figure 2. First, The language model interprets the query and creates a structured plan that identifies what information is requested, about which element of the machine, what operation should be performed and what time period should be analyzed. For example, When asked “Was any abnormal value detected in the spindle torque?” 1 between the 10:00 and the 10:30 of 10 July 2026?”, the system identifies the signal corresponding to the torque of the first spindle, limits the query to the indicated time range and analyzes the recorded values to determine if there are any anomalous behaviors.
Before running the query, the system normalizes the question to correctly interpret dates, equivalent terms and expressions at most, minimum, media, last value or evolution. From this interpretation, LangGraph [4] coordinate the flow and select the appropriate source. Questions about units, definitions, Synonyms or variable names are directed to the ontology, while inquiries about registered securities, Time evolutions or comparisons are sent to TimescaleDB.
The ontology acts as a link layer between the vocabulary used by the operators and the internal nomenclature of the database.. As shown in Figure 3, terms like even, spindle torque or effort are associated with the same magnitude, while the reference to the spindle 1 allows you to identify the corresponding field, in this case PAR1. So, the user can query the information using common production environment expressions, without needing to know the technical names of the stored signals.
Access to TimescaleDB is via controlled, read-only queries. The system previously checks that the requested variables exist and limits the allowed operations, preventing the language model from modifying or deleting information. Once the result is obtained, this is returned to the LLM, which transforms it into a clear and understandable response without altering the recovered values.
The local execution of the model allows the operators' questions, variable names and production results remain within the company's infrastructure. Thus, process information does not need to be sent to external services, which facilitates control over the data and contributes to preserving its confidentiality, a particularly important requirement in industrial environments.
Use case in CFAA: EKIN A218 electromechanical broaching machine
At the Aeronautical Advanced Manufacturing Center (CFAA) [5], The prototype has been deployed on an EKIN A218 electromechanical vertical broaching machine., whose acquisition systems (complemented by a Savvy Data Systems Edge device) They record signals from the CNC (Fagor 8070) and the PLC, like the pair, the power, the current, the speed and position of the drives. As seen in the figure 4, Broaching is carried out in a single linear pass in which the teeth of the brush progressively come into contact with the piece and remove material sequentially..
So that the agent can reason in these terms, Ontology does not only describe magnitudes and actions, but also the entities of the process: the cutting tool, the past (the last blowjob), the active cutting zone and the tool state. Thanks to that, an expression like since last brush change stops being an ambiguous reference and becomes a concrete interval on which to operate.
The figure 5 summarizes the operation of the use case. On the left side the EKIN A218 broaching machine is shown along with the main monitored variables. Based on a question asked by the operator, the agent interprets the request, consults the ontology to relate the terms used with the corresponding variables and accesses TimescaleDB to retrieve the necessary data. Finally, The result is presented in natural language and in a clear format that can be directly interpreted by the operator..
Conclusions and future work
The work presented shows how the combination of language models, ontologies and time series databases can facilitate access to industrial information through questions formulated in natural language. In the case of the EKIN A218 broaching machine, The agent allows you to relate the vocabulary used by the operators with the signals recorded by the machine and consult values, evolutions and time intervals without needing to know the internal structure of the database.
The main contribution of architecture does not lie solely in using an LLM, but to integrate it within a controlled flow. Ontology provides the meaning of concepts, LangGraph coordinates the source selection and TimescaleDB provides the actual process data.
As future work, It is proposed to integrate the architecture with industrial interoperability technologies. On the one hand, considering using Asset Administration Shell (AAS) to commonly organize machine information, components and processes, facilitating connection with equipment from different manufacturers. Secondly, The use of Model Context Protocol will be studied (MCP) as a mechanism to standardize the agent's connection to new data sources and external tools.
It will also be necessary to validate the system with real questions from operators and engineers., evaluating the interpretation of queries, variable selection, response time and its usefulness before extending it to other processes.


